
/*文件取值  包含图片 全部转换为文件*/
function companyAdd() {
    let forData = new FormData();
    forData.append("companyName",$("#companyName").val());
    forData.append("logo",$("#logo")[0].files[0]);
    forData.append("ad",$("#ad").val());
    forData.append("net", $("#net").val());//文件取值
    forData.append("introduce",$("#introduce").val());
    forData.append("version",$("#version").val());
    $.ajax({
        url: '/back/company/companyAdd',
        data: forData,
        contentType:false,
        processData:false,
        type: 'post',
        dataType: 'json',
        success: function (data) {
            if (data.result === 1) {
                alert("提交成功");
                $("#right").load('/back/company/companyManage.html');
            } else {
                alert("提交失败")
            }
        }
    })
}
function cancelCompanyAdd() {
    $("#right").load('/back/company/companyManage.html');
}